package org.yonggan.shop.utils

import redis.clients.jedis.{JedisPool, JedisPoolConfig}

object JedisPoolUtils {

  private val poolConfig = new JedisPoolConfig()


  private  val pool =  new JedisPool(poolConfig,"cdh02",6379)


  /**
    * jedis 连接
    * @param index
    */
  def geJedis (index:Int = 0) = {
    val jedis = pool.getResource
    jedis.select(index)
    jedis
  }



}
